<!DOCTYPE html>
<html lang="en">
<head>
<#include "/common/head.ftl"/>
<script type="text/javascript">
	$(function() {
		$("#st_category a").on("click", function() {
			$(this).addClass("yes").siblings().removeClass("yes");
			var stCategoryId = $(this).attr("data-value");
			$("#stCategoryId").val(stCategoryId)
			$("#form1").submit();
		});
		$("#st_words a").on("click", function() {
			$(this).addClass("yes").siblings().removeClass("yes");
			var stWords = $(this).attr("data-value");
			$("#stWords").val(stWords)
			$("#form1").submit();
		});
		$("#st_flag a").on("click", function() {
			$(this).addClass("yes").siblings().removeClass("yes");
			var stFlag = $(this).attr("data-value");
			$("#stFlag").val(stFlag)
			$("#form1").submit();
		});
		$("#st_date a").on("click", function() {
			$(this).addClass("yes").siblings().removeClass("yes");
			var stDate = $(this).attr("data-value");
			$("#stDate").val(stDate)
			$("#form1").submit();
		});
		$("#st_free a").on("click", function() {
			$(this).addClass("yes").siblings().removeClass("yes");
			var stFree = $(this).attr("data-value");
			$("#stFree").val(stFree)
			$("#form1").submit();
		});
		$("#st_order a").on("click", function() {
			$(this).addClass("yes").siblings().removeClass("yes");
			var stOrder = $(this).attr("data-value");
			$("#stOrder").val(stOrder)
			$("#form1").submit();
		});
	});
</script>
</head>
<body>
	<#include "/common/header.ftl"/>

	<div class="book_bg">

		<div class="libr_xuanz" id="host_select">
			<h2>
				<span></span> 书库 <i>TIMES STACK </i>
			</h2>
			<ul>
				<li id="st_category"><span>小说分类：</span> <#if
					searchBook.stCategoryId==-1><a class="yes" data-value="-1">全部</a><#else><a
					data-value="-1">全部</a></#if> <#list categoryList as category> <#if
					searchBook.stCategoryId==category.categoryId><a class="yes"
					data-value="${category.categoryId?c}">${(category.categoryName)!''}</a><#else><a
					data-value="${category.categoryId?c}">${(category.categoryName)!''}</a></#if>
					</#list></li>
				<div class="clear"></div>

				<li id="st_words"><span>作品字数：</span> <#if
					searchBook.stWords==-1><a class="yes" data-value="-1">不限</a><#else><a
					data-value="-1">不限</a></#if> <#if searchBook.stWords==1><a
					class="yes" data-value="1">30万以下</a><#else><a data-value="1">30万以下</a></#if>
					<#if searchBook.stWords==2> <a class="yes" data-value="2">30-50万</a><#else><a
					data-value="2">30-50万</a></#if> <#if searchBook.stWords==3> <a
					class="yes" data-value="3">50-100万</a><#else><a data-value="3">50-100万</a></#if>
					<#if searchBook.stWords==4> <a class="yes" data-value="4">100-200万</a><#else><a
					data-value="4">100-200万</a></#if> <#if searchBook.stWords==5> <a
					class="yes" data-value="5">200万以上</a><#else><a data-value="5">200万以上</a></#if>

				</li>
				<div class="clear"></div>

				<li id="st_flag"><span>写作进度：</span> <#if searchBook.stFlag==-1><a
					class="yes" data-value="-1">不限</a><#else><a data-value="-1">不限</a></#if>
					<#if searchBook.stFlag==0><a class="yes" href="" data-value="0">连载</a><#else><a
					data-value="0">连载</a></#if> <#if searchBook.stFlag==1><a
					class="yes" data-value="1">完结</a><#else><a data-value="1">完结</a></#if></li>
				<div class="clear"></div>

				<li id="st_date"><span>更新时间：</span> <#if searchBook.stDate==-1><a
					class="yes" data-value="-1">不限</a><#else><a data-value="-1">不限</a></#if>

					<#if searchBook.stDate==1><a class="yes" data-value="1">三日内</a><#else><a
					data-value="1">三日内</a></#if> <#if searchBook.stDate==2><a
					class="yes" data-value="2">七日内</a><#else><a data-value="2">七日内</a></#if>
					<#if searchBook.stDate==3><a class="yes" data-value="3">七日内</a><#else><a
					data-value="3">七日内</a></#if> <#if searchBook.stDate==4><a
					class="yes" data-value="4">半月内</a><#else><a data-value="4">半月内</a></#if>
					<#if searchBook.stDate==5><a class="yes" data-value="5">一月内</a><#else><a
					data-value="5">一月内</a></#if></li>
				<div class="clear"></div>

				<li id="st_free"><span>是否免费：</span> <#if searchBook.stFree==-1><a
					class="yes" data-value="-1">不限</a><#else><a data-value="-1">不限</a></#if>
					<#if searchBook.stFree==1><a class="yes" data-value="1">免费作品</a><#else><a
					data-value="1">免费作品</a></#if> <#if searchBook.stFree==2><a
					class="yes" data-value="2">收费作品</a><#else><a data-value="2">收费作品</a></#if>

				</li>
				<div class="clear"></div>


				<li id="st_order"><span>排序方式：</span> <#if
					searchBook.stOrder==1><a class="yes" data-value="1">点击数</a><#else><a
					data-value="1">点击数</a></#if> <#if searchBook.stOrder==2><a
					class="yes" data-value="2">推荐数</a><#else><a data-value="2">推荐数</a></#if>
					<#if searchBook.stOrder==3><a class="yes" data-value="3">字数</a><#else><a
					data-value="3">字数</a></#if> <#if searchBook.stOrder==4><a
					class="yes" data-value="4">更新时间</a><#else><a data-value="4">更新时间</a></#if>
					<#if searchBook.stOrder==5><a class="yes" data-value="5">入库时间</a><#else><a
					data-value="5">入库时间</a></#if>


					<div class="clear"></div>
			</ul>
		</div>

		<div>
			<form id="form1" name="form1" method="post"
				action="${path}/stack/index">
				<input type="hidden" name="stCategoryId" id="stCategoryId"
					value="#{searchBook.stCategoryId}"> <input type="hidden"
					name="stWords" id="stWords" value="#{searchBook.stWords}">
				<input type="hidden" name="stFlag" id="stFlag"
					value="#{searchBook.stFlag}"> <input type="hidden"
					name="stDate" id="stDate" value="#{searchBook.stDate}"> <input
					type="hidden" name="stFree" id="stFree"
					value="#{searchBook.stFree}"> <input type="hidden"
					name="stOrder" id="stOrder" value="#{searchBook.stOrder}">
			</form>
		</div>
		<div class="libr_quanb">
			<div class="libr_ql">
				<h2>
					<span></span>查询结果 <i> LATEST CHAPTER </i>
				</h2>
				<#list bookList as book>
				<dl>
					<dt>
						<a href="${path}/book/bookInfo?bookId=${((book.bookId)!'0')?c}"><img
							src="${sourceUrl}/${(book.bookImage)!''}"></a>
					</dt>
					<dd>
						<h3>

							<a href="${path}/book/bookInfo?bookId=${((book.bookId)!'0')?c}">${(book.bookName)!''}</a>
							<span>更新至：<a href="${path}/book/chapterContent?bookId=${((book.bookId)!'0')?c}&chapterId=${((book.bookLatestChapterId)!'0')?c}"
								class="chapter">${(book.bookLatestChapter)!''}</a></span>

						</h3>
					</dd>
					<dd>
						<span>作者：<a>${(book.bookAuthor)!''}</a></span> <span>分类：<a
							href="#">${(book.bookCategoryName)!''}</a></span> <span>更新时间：${(book.bookLatestDate?string("yyyy-MM-dd"))!''}</span>
						<span>总字数：${(book.bookWords)!''}</span> <span>人气：${(book.bookClick)!''}</span>
					</dd>
					<dd>${(book.bookDesc)!''}</dd>
					<dd>
						<a href="${path}/book/chapterList?bookId=${((book.bookId)!'0')?c}"
							class="ql_niu1">立即阅读</a>
					</dd>
					<div class="clear"></div>
				</dl>
				</#list>
				<div><@pageftl url="${path}/stack/index" pageNo=pageNo
					recordCount=recordCount> </@pageftl></div>
			</div>

			<div class="libr_qr">
				<div class="xqr_1 fr liR">
					<h2>
						<span> <!--<a href="">更多></a>-->
						</span>强推榜
					</h2>
					<ul>
						<li class="h_86 h_17"><ul>

								<li class="h_86"><ul>
										<li class="fl w_18"><img src="${path}/image/p_1.jpg"
											width="18" height="18"></li>
										<li class="fl w_55"><a
											href="${path}/book/bookInfo?bookId=${((bookForward1.bookId)!'0')?c}"
											class="gallery"> <img
												src="${sourceUrl}/${(bookForward1.bookImage)!''}" width="55"
												height="78"></a></li>
										<li class="fl"><ul>
												<li class="f_16"><a
													href="${path}/book/bookInfo?bookId=${((bookForward1.bookId)!'0')?c}"><b>${(bookForward1.bookName)!''}</b></a></li>
												<li>${(bookForward1.bookAuthor)!''}</li>
											</ul></li>
									</ul></li> <#list bookForwardList as book>
								<li class="h_18"><ul>
										<li class="fl w_18"><img
											src="${path}/image/p_${book_index+2}.jpg" width="18"
											height="18"></li>
										<li class="fl"><a
											href="${path}/book/bookInfo?bookId=${((book.bookId)!'0')?c}">${(book.bookName)!''}</a></li>
									</ul></li> </#list>

							</ul></li>
					</ul>
				</div>
				<br> <br>
				<div class="xqr_2 fr liR">
					<h2>
						<span></span>点击榜
					</h2>
					<ul>
						<li class="h_86 h_17"><ul>

								<li class="h_86"><ul>
										<li class="fl w_18"><img src="${path}/image/p_1.jpg"
											width="18" height="18"></li>
										<li class="fl w_55"><a
											href="${path}/book/bookInfo?bookId=${((bookClick1.bookId)!'0')?c}"
											class="gallery"> <img
												src="${sourceUrl}/${(bookClick1.bookImage)!''}" width="55"
												height="78"></a></li>
										<li class="fl"><ul>
												<li class="f_16"><a
													href="${path}/book/bookInfo?bookId=${((bookClick1.bookId)!'0')?c}"><b>${(bookClick1.bookName)!''}</b></a></li>
												<li>${(bookClick1.bookAuthor)!''}</li>
											</ul></li>
									</ul></li> <#list bookClickList as book>
								<li class="h_18"><ul>
										<li class="fl w_18"><img
											src="${path}/image/p_${book_index+2}.jpg" width="18"
											height="18"></li>
										<li class="fl"><a href="${path}/book/bookInfo?bookId=${((book.bookId)!'0')?c}">${(book.bookName)!''}</a></li>
									</ul></li> </#list>

							</ul></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<#include "/common/footer.ftl"/>
</body>
</html>